<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: MacToPhyInterface Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00134.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">MacToPhyInterface Class Reference<div class="ingroups"><a class="el" href="a00509.html">macLayer - MAC layer modules</a> &#124; <a class="el" href="a00510.html">phyLayer - physical layer modules</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="MacToPhyInterface" -->
<p>Defines the methods provided by the phy to the mac layer.  
 <a href="a00134.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00295_source.html">MacToPhyInterface.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for MacToPhyInterface:</div>
<div class="dyncontent">
<div class="center"><img src="a00846.png" border="0" usemap="#MacToPhyInterface_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00847.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52">BasePhyMessageKinds</a> { <br/>
&#160;&#160;<a class="el" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52ab00e54021af4a33a84ac61a7543c7528">TX_OVER</a> =  22000, 
<a class="el" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52a876c7366bd2bcb675b41e60007831d06">RADIO_SWITCHING_OVER</a>, 
<a class="el" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52aa6ff58f5815b155504d37339ee5c7222">CHANNEL_SENSE_REQUEST</a>, 
<a class="el" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52a96eafe94b4f472727793a10013af7671">AIR_FRAME</a>, 
<br/>
&#160;&#160;<a class="el" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52a25b918f3c2f7bd926610b544bc78497a">LAST_BASE_PHY_KIND</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Message kinds used by every phy layer.  <a href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#a00dd43576b4da205117d53bd3baadc71">getRadioState</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current state the radio is in. See RadioState for possible values.  <a href="#a00dd43576b4da205117d53bd3baadc71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual simtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#ad25abbad9aa16bdbf24bf1dd582b1c6f">setRadioState</a> (int rs)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tells the <a class="el" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a> to switch to the specified radio state.  <a href="#ad25abbad9aa16bdbf24bf1dd582b1c6f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="a00044.html">ChannelState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#affa30a25b96ffe387b22c68ca35f77a5">getChannelState</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current state of the channel. See <a class="el" href="a00044.html" title="Provides information about the current state of the channel:">ChannelState</a> for details.  <a href="#affa30a25b96ffe387b22c68ca35f77a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#a700bd4a7b79a58b2c5713f976ba7e4b7">getPhyHeaderLength</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the length of the phy header in bits.  <a href="#a700bd4a7b79a58b2c5713f976ba7e4b7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e770727361fe1774b88d5667b89417e"></a><!-- doxytag: member="MacToPhyInterface::setCurrentRadioChannel" ref="a2e770727361fe1774b88d5667b89417e" args="(int newRadioChannel)=0" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#a2e770727361fe1774b88d5667b89417e">setCurrentRadioChannel</a> (int newRadioChannel)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the channel currently used by the radio. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6271dfe09bf5cef8c8afb96de00182ab"></a><!-- doxytag: member="MacToPhyInterface::getCurrentRadioChannel" ref="a6271dfe09bf5cef8c8afb96de00182ab" args="() const =0" -->
virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#a6271dfe09bf5cef8c8afb96de00182ab">getCurrentRadioChannel</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the channel currently used by the radio. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8df74a8d059d506f966ca52e72643814"></a><!-- doxytag: member="MacToPhyInterface::getNbRadioChannels" ref="a8df74a8d059d506f966ca52e72643814" args="() const =0" -->
virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#a8df74a8d059d506f966ca52e72643814">getNbRadioChannels</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of channels available on this radio. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Defines the methods provided by the phy to the mac layer. </p>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a36bc50a86bf1cc0f9efd374613d61a52"></a><!-- doxytag: member="MacToPhyInterface::BasePhyMessageKinds" ref="a36bc50a86bf1cc0f9efd374613d61a52" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52">MacToPhyInterface::BasePhyMessageKinds</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Message kinds used by every phy layer. </p>
<p>Physical layers should begin their additional kinds at the value of LAST_BASE_PHY_KIND. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a36bc50a86bf1cc0f9efd374613d61a52ab00e54021af4a33a84ac61a7543c7528"></a><!-- doxytag: member="TX_OVER" ref="a36bc50a86bf1cc0f9efd374613d61a52ab00e54021af4a33a84ac61a7543c7528" args="" -->TX_OVER</em>&nbsp;</td><td>
<p>Indicates the end of a send transmission. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a36bc50a86bf1cc0f9efd374613d61a52a876c7366bd2bcb675b41e60007831d06"></a><!-- doxytag: member="RADIO_SWITCHING_OVER" ref="a36bc50a86bf1cc0f9efd374613d61a52a876c7366bd2bcb675b41e60007831d06" args="" -->RADIO_SWITCHING_OVER</em>&nbsp;</td><td>
<p>Indicates the end of a radio switch. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a36bc50a86bf1cc0f9efd374613d61a52aa6ff58f5815b155504d37339ee5c7222"></a><!-- doxytag: member="CHANNEL_SENSE_REQUEST" ref="a36bc50a86bf1cc0f9efd374613d61a52aa6ff58f5815b155504d37339ee5c7222" args="" -->CHANNEL_SENSE_REQUEST</em>&nbsp;</td><td>
<p>Channel sense control message between Mac and Phy. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a36bc50a86bf1cc0f9efd374613d61a52a96eafe94b4f472727793a10013af7671"></a><!-- doxytag: member="AIR_FRAME" ref="a36bc50a86bf1cc0f9efd374613d61a52a96eafe94b4f472727793a10013af7671" args="" -->AIR_FRAME</em>&nbsp;</td><td>
<p>AirFrame kind. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a36bc50a86bf1cc0f9efd374613d61a52a25b918f3c2f7bd926610b544bc78497a"></a><!-- doxytag: member="LAST_BASE_PHY_KIND" ref="a36bc50a86bf1cc0f9efd374613d61a52a25b918f3c2f7bd926610b544bc78497a" args="" -->LAST_BASE_PHY_KIND</em>&nbsp;</td><td>
<p>Stores the id on which classes extending BasePhy should continue their own kinds. </p>
</td></tr>
</table>
</dd>
</dl>
<div class="fragment"><pre class="fragment">                           {
    <a class="code" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52ab00e54021af4a33a84ac61a7543c7528" title="Indicates the end of a send transmission.">TX_OVER</a> = 22000,
    <a class="code" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52a876c7366bd2bcb675b41e60007831d06" title="Indicates the end of a radio switch.">RADIO_SWITCHING_OVER</a>,
    <a class="code" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52aa6ff58f5815b155504d37339ee5c7222" title="Channel sense control message between Mac and Phy.">CHANNEL_SENSE_REQUEST</a>,
    <a class="code" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52a96eafe94b4f472727793a10013af7671" title="AirFrame kind.">AIR_FRAME</a>,
    <a class="code" href="a00134.html#a36bc50a86bf1cc0f9efd374613d61a52a25b918f3c2f7bd926610b544bc78497a" title="Stores the id on which classes extending BasePhy should continue their own kinds.">LAST_BASE_PHY_KIND</a>,
  };
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="affa30a25b96ffe387b22c68ca35f77a5"></a><!-- doxytag: member="MacToPhyInterface::getChannelState" ref="affa30a25b96ffe387b22c68ca35f77a5" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="a00044.html">ChannelState</a> MacToPhyInterface::getChannelState </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the current state of the channel. See <a class="el" href="a00044.html" title="Provides information about the current state of the channel:">ChannelState</a> for details. </p>
<p>NOTE: Channel state information is not available until initialization is over and the simulation has started. </p>

<p>Implemented in <a class="el" href="a00029.html#a8cc235ebda1b8ff6dcf17b6b0b91fc13">BasePhyLayer</a>.</p>

<p>Referenced by <a class="el" href="a00128.html#ab3030c86acac78401f877a61cefcdad6">Mac80211::beginNewCycle()</a>, and <a class="el" href="a00069.html#a254a29c1cc1f0292039d57c1d189cda3">CSMAMacLayer::handleSelfMsg()</a>.</p>

</div>
</div>
<a class="anchor" id="a700bd4a7b79a58b2c5713f976ba7e4b7"></a><!-- doxytag: member="MacToPhyInterface::getPhyHeaderLength" ref="a700bd4a7b79a58b2c5713f976ba7e4b7" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual long MacToPhyInterface::getPhyHeaderLength </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the length of the phy header in bits. </p>
<p>Since the MAC layer has to create the signal for a transmission it has to know the total length of the packet and therefore needs the length of the phy header. </p>

<p>Implemented in <a class="el" href="a00029.html#acb8478eaf566b68e949e6d16cea0e22a">BasePhyLayer</a>.</p>

<p>Referenced by <a class="el" href="a00026.html#a61c82dc3b225eac37f7fa9936c28c2c3">BaseMacLayer::initialize()</a>.</p>

</div>
</div>
<a class="anchor" id="a00dd43576b4da205117d53bd3baadc71"></a><!-- doxytag: member="MacToPhyInterface::getRadioState" ref="a00dd43576b4da205117d53bd3baadc71" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int MacToPhyInterface::getRadioState </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the current state the radio is in. See RadioState for possible values. </p>
<p>NOTE: Radio state information is not available until initialization-stage 1.</p>
<p>This method is mainly used by the mac layer. </p>

<p>Implemented in <a class="el" href="a00029.html#a893db61c894236b50c4c56e569ceedbb">BasePhyLayer</a>.</p>

<p>Referenced by <a class="el" href="a00035.html#a6b362134693ef8ab49abdea9a7d6dda1">BMacLayer::handleLowerControl()</a>, <a class="el" href="a00128.html#a41f1a7b86f420e1f840c14badf2b0890">Mac80211::handleLowerControl()</a>, <a class="el" href="a00126.html#a28c3d64e3643d3b72d153036797fffa0">LMacLayer::handleLowerControl()</a>, <a class="el" href="a00069.html#a2eb12cedf0b4b5e6fda8bd6666186cb6">CSMAMacLayer::handleLowerControl()</a>, <a class="el" href="a00128.html#ac8bfb04590aab2434bd8d17ee4e213d9">Mac80211::handleLowerMsg()</a>, <a class="el" href="a00035.html#a0d6b089a3e75932385bf38815b44b8bc">BMacLayer::handleSelfMsg()</a>, <a class="el" href="a00069.html#a254a29c1cc1f0292039d57c1d189cda3">CSMAMacLayer::handleSelfMsg()</a>, and <a class="el" href="a00069.html#aa4ace66cbd53164dc27f4fba70dd60b4">CSMAMacLayer::scheduleBackoff()</a>.</p>

</div>
</div>
<a class="anchor" id="ad25abbad9aa16bdbf24bf1dd582b1c6f"></a><!-- doxytag: member="MacToPhyInterface::setRadioState" ref="ad25abbad9aa16bdbf24bf1dd582b1c6f" args="(int rs)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual simtime_t MacToPhyInterface::setRadioState </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rs</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tells the <a class="el" href="a00029.html" title="The BasePhyLayer represents the physical layer of a nic.">BasePhyLayer</a> to switch to the specified radio state. </p>
<p>NOTE: Radio state can't be changed until initialization-stage 1.</p>
<p>The switching process can take some time depending on the specified switching times in the ned file. The return value is the time needed to switch to the specified state, or smaller zero if the radio could not be switched (propably because it is already switching. </p>

<p>Implemented in <a class="el" href="a00029.html#a5170b3aadae25dc6b9e61974076be04b">BasePhyLayer</a>, <a class="el" href="a00175.html#a20ac8e3956abe65f59c69d6dcd54ec1d">PhyLayerUWBIR</a>, and <a class="el" href="a00174.html#ab297612cef7286db7722d19ea3a8924f">PhyLayerBattery</a>.</p>

<p>Referenced by <a class="el" href="a00128.html#a0a87fa1791117ef1dd1841ba217e4245">Mac80211::handleEndContentionTimer()</a>, <a class="el" href="a00128.html#a7d36a55827a7ea91b2539c86d79349af">Mac80211::handleEndSifsTimer()</a>, <a class="el" href="a00128.html#a41f1a7b86f420e1f840c14badf2b0890">Mac80211::handleLowerControl()</a>, <a class="el" href="a00126.html#a28c3d64e3643d3b72d153036797fffa0">LMacLayer::handleLowerControl()</a>, <a class="el" href="a00069.html#a2eb12cedf0b4b5e6fda8bd6666186cb6">CSMAMacLayer::handleLowerControl()</a>, <a class="el" href="a00035.html#a0d6b089a3e75932385bf38815b44b8bc">BMacLayer::handleSelfMsg()</a>, <a class="el" href="a00126.html#a2397193676d296cc6757b31eef203bb3">LMacLayer::handleSelfMsg()</a>, <a class="el" href="a00069.html#a254a29c1cc1f0292039d57c1d189cda3">CSMAMacLayer::handleSelfMsg()</a>, and <a class="el" href="a00196.html#a9a23cdc88daa658398f0bc10ac4ed219">SimpleMacLayer::initialize()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/<a class="el" href="a00295_source.html">MacToPhyInterface.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00134.html">MacToPhyInterface</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
